package gravipong;


import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

class animation extends JPanel{
    @Override
    public void paintComponent(Graphics g){
        g.setColor(Color.white);
        g.fillRect(0, 0, 500, 500);
        g.setColor(Color.blue);
        for (gravitron grav : Main.gravi) {
            g.fillOval((int)grav.x,(int) grav.y, 10, 10);
        }g.setColor(Color.red);
        for (paddle pad : Main.pads) {
            g.fillRect((int)pad.x,(int) pad.y, 10,50);
        }g.setColor(Color.green);
        for (ball bally : Main.balls) {
            g.fillOval((int)bally.x,(int)bally.y, 10, 10);
        }
    }
}